﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Homework04
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("老子到此一游");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show("老子到此一游", "孙大圣");
        }

        private void button3_Click(object sender, EventArgs e)
        {
            MessageBox.Show("老子到此一游", "孙大圣",MessageBoxButtons.OKCancel);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            MessageBox.Show("老子到此一游", "孙大圣", MessageBoxButtons.OKCancel,MessageBoxIcon.Information);
        }

        private void button5_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("是否写上老子到此一游", "孙大圣", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (result == DialogResult.Yes ) 
            {
                MessageBox.Show("请注意文明,不要乱涂乱写", "批评");
            }
            else
            {
                MessageBox.Show("不错不错,是杂好牙子", "表扬");
            }
        }

        private void button6_Click(object sender, EventArgs e)
        {
            NewForm newForm = new NewForm();
            newForm.ShowDialog();
        }
    }
}
